package com.rykj.energy.database.service;

import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * @author GanLu
 * @date 2020-04-26 15:31
 */
public interface IBaseService<T> extends IService<T> {
    T getOneByProperty(SFunction<T, ?> property, Object value);

    List<T> getListByProperty(SFunction<T, ?> property, Object value);

    T getOneByColumn(String column, Object value);

    List<T> getListByColumn(String column, Object value);

    Integer countByPropertyExcludeId(Integer id, SFunction<T, ?> property, Object value);

    Integer countByProperty(SFunction<T, ?> property, Object value);

}
